#!/bin/bash
if [ `pwd` != '/data/ws-scrcpy' ];then 
	echo ok
fi
npm install
npm run dist:prod
cp config.json dist/
cp scrcpyd.service /lib/systemd/system/
systemctl daemon-reload
systemctl enable scrcpyd.service
systemctl start scrcpyd.service
# 安装完成后要求输入用户名密码和认证地址
cp scrcpy-config /bin/scrcpy-config
chmod +x /bin/scrcpy-config
scrcpy-config